#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
@file_name: synchronously_reading_status_codes.py
@date: 2025-07-21 17:20
@author: Falling Snow
@desc: 同步读取网页的状态码数据
"""

import time

import requests


def read_example() -> None:
    response = requests.get("https://www.example.com")
    print(response.status_code)


if __name__ == '__main__':
    sync_start = time.time()

    read_example()
    read_example()
    read_example()
    read_example()

    sync_end = time.time()

    print(f"同步运行耗费{(sync_end - sync_start):.4f} 秒!")
